<template>
  <van-nav-bar
    :fixed="true"
    :placeholder="true"
    @click-left="onClickLeft"
    @click-right="$router.push('/index')"
    :title="title"
    left-arrow
  >
    <template #right>
      <van-icon name="wap-home-o" size="18" />
    </template>
  </van-nav-bar>
</template>
<script setup>
import { useRouter } from "vue-router";
let router = useRouter();
defineProps(["title"]);
//导航回退按钮
let onClickLeft = () => history.back();
</script>
<style scoped>
</style>